#ifndef _CORELSTACKTRACEMGR_H_
#define _CORELSTACKTRACEMGR_H_

#include <string>
#include <map>

class CCorelStackTraceMgr
{
public:
    CCorelStackTraceMgr()
    {
        InitializeCriticalSection(&m_csLock);
    }

    ~CCorelStackTraceMgr()
    {
        DeleteCriticalSection(&m_csLock);
    }

public:
    DWORD GetStackTraceId(LPCWSTR lpcwszStackTrace);
    BOOL  GetStackTrace(DWORD dwStackTraceId, std::wstring& wstrStackTrace);
    VOID Clear();

private:
    CRITICAL_SECTION m_csLock;
    std::map<std::wstring, DWORD> m_mapStackTraceRepository;
};

#endif // _CORELSTACKTRACEMGR_H_